Typically, a plurality of web pages displayed in a browser on a client device cannot directly communicate among themselves. Because one page generally cannot directly communicate with another page, transmitting data directly among the plurality of pages is generally not possible.
For example, three approaches to indirectly updating data are as follows:
The first approach to updating data is to use localstorage of HTML5. In other words, the browser obtains update data from a server. Then the browser transmits the obtained update data to each of the browser's own pages to be updated. Currently, many browsers do not support localstorage, and different browsers are unable to communicate with each other. Because different browsers obtain the update data based on different time cycles, page updating is usually not synchronized between the various browsers.
The second approach to updating data is a JavaScript (JS) polling approach. In this approach, the client acquires update data from the server. Each page regularly polls the server to inquire whether there is new data. To ensure the timeliness of the page data, the polling time is set to be as short as possible. The shorter the polling time is set to be, the greater the impact on the function of the page, and the greater the number of pages to be polled, the greater the effect to the whole system. If the server data has been changed but the page did not timely request an update, the accuracy of the page will be affected.
The third approach to updating data is, for each page, establishing a long link with the server. The long link is also known as an HTTP Persistent Connection, an HTTP keep-alive, or an HTTP connection reuse. The long link is capable of using the same TCP connection to send and receive multiple HTTP requests/responses. Otherwise, a new TCP connection must be opened for every single request/response pair. Although the use of long links helps increase HTTP performance and ensures immediacy, the approach wastes bandwidth resources because a large number of pages may be transferred to and from the server.
Accordingly, direct communications between client pages would be beneficial.